#
# Package.
#

package iSOCK::Controller::Datasheet::Issues;

#
# Base.
#

use Moose;
use namespace::autoclean;

BEGIN { extends 'iSOCK::Controller::Root' }

=head1 NAME

iSOCK::Controller::Datasheet::Issues - Component Controller for iSOCK

=head1 DESCRIPTION

[enter your description here]

=head1 METHODS

=cut

#
# Subs.
#

sub index :Path :Args(0) {
  my ( $self, $c ) = @_;

  if ( my $datasheet_id = $c->request->parameters->{datasheet_id} || $c->request->parameters->{id} ) {
    $datasheet_id =~ s/^[^_]+_//;
    
    $c->stash ( number => $datasheet_id );
  }
  elsif ( my $number = $c->request->parameters->{number} ) {
    $c->stash ( number => $number );
  }

  $c->stash ( letter => $c->request->parameters->{tag} || $c->request->parameters->{letter} );

  $c->forward ( qw( iSOCK::Controller::Root render_view ) );
}

=head1 AUTHOR

Xavier Caron

=head1 LICENSE

This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

#
# End of iSOCK::Controller::Datasheet::Issues.
#

1;
